import { registerEditorProvider } from '@ibiz-template/runtime';
import { App } from 'vue';
import { CheckinHolidayCalendar } from './checkin-holiday-calendar';
import { CheckinHolidayCalendarProvider } from './checkin-holiday-calendar.provider';

export default {
  install(app: App) {
    // 全局注册编辑器插件组件
    app.component(CheckinHolidayCalendar.name!, CheckinHolidayCalendar);
    // 全局注册编辑器插件适配器，EDITOR_CUSTOMSTYLE是插件类型，HOLIDAY_CALENDAR是插件标识
    registerEditorProvider(
      'EDITOR_CUSTOMSTYLE_HOLIDAY_CALENDAR',
      () => new CheckinHolidayCalendarProvider(),
    );
  },
};
